package com.huluobo.travelpreventionjetpack

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.alibaba.android.arouter.launcher.ARouter
import com.huluobo.appbase.config.ArouterConfig
import com.huluobo.appbase.ui.BaseActivity
import com.huluobo.module_risk_level.ui.activity.RiskLevelActivity
import com.huluobo.module_test_agency.ui.activity.AgencyMessageActivity
import com.huluobo.travelpreventionjetpack.databinding.ActivityMainBinding

class MainActivity : BaseActivity<ActivityMainBinding>() {
    override fun getViewBinding(): ActivityMainBinding = ActivityMainBinding.inflate(layoutInflater)

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        initClick()
    }

    private fun initClick() {
        mViewBinding.llAgency.setOnClickListener {
//            ARouter.getInstance().build(ArouterConfig.AGENCY_MESSAGE)
//                .navigation()
            val intent = Intent(this@MainActivity, AgencyMessageActivity::class.java)
            startActivity(intent)
        }

        mViewBinding.llRiskLevel.setOnClickListener {
//            ARouter.getInstance().build(ArouterConfig.RISK_LEVEL).navigation()
            val intent = Intent(this@MainActivity, RiskLevelActivity::class.java)
            startActivity(intent)
        }

        mViewBinding.llTravel.setOnClickListener {
            ARouter.getInstance().build(ArouterConfig.TRAVEL_POLICY).navigation()
        }
    }

}